Skip to content

feat(PrizePool): add playerShare & clubShare support.#7284

Open
MischiefCS wants to merge 28 commits intomainfrom
clubshare-vrs
Open

feat(PrizePool): add playerShare & clubShare support.#7284
MischiefCS wants to merge 28 commits intomainfrom
clubshare-vrs

Conversation

@MischiefCS
Copy link
Copy Markdown
Collaborator

Summary

Primarily driven by the cs wiki due to how nearly all Tier 1 events have incorrect prize data, but I believe this may also be appropriate for dota2.

In a majority of Tier 1 events, they now introduced a club share split. For how the cs wiki works (and I believe all other wikis), clubshare does not really need to be tracked in itself. At a team level we have always attributed the full prizepool, even if the players were getting part or some.

Our only difference is how we attribute the players cut of the prizepool. Thus far we have only represente the "player share" in tier 1 events as we dont want to inflate their earnings. This PR aims to interject the individualprizemoney path such that it reads from the playershare only, and the event & teams can read the true data which we will be able to add to the wiki.

This has been one of the primary requests fromc s contributors for the past 15 odd months,

How did you test this change?

Deployed under /dev/MischiefClub to Commons and counterstrike

Test page at: https://liquipedia.net/counterstrike/User:MischiefCS/PGL/2025/Astana

image

Im not sure how to test players receiving the earnings when its such a large /dev/ package as this.

This also doesnt look great on mobile, its been discussed ideally we would have a collapsible js function to colapse the two shares, not sure how to achieve this.

Likewise, its been suggested that ideally would have an explainer / note higlight for the two shares. Again not too sure how to achieve this.

@MischiefCS MischiefCS added the g: counter-strike Counter-Strike label Mar 20, 2026
@MischiefCS
Copy link
Copy Markdown
Collaborator Author

collapsibility might not be needed. consensus appears to be about 50/50

Comment thread lua/wikis/commons/PrizePool/Base.lua Outdated
Comment thread lua/wikis/commons/PrizePool/Base.lua Outdated
Comment thread lua/wikis/commons/PrizePool/Base.lua Outdated
Comment thread lua/wikis/commons/PrizePool/Placement.lua Outdated
Comment thread lua/wikis/commons/PrizePool/Placement.lua Outdated
Comment thread lua/wikis/commons/PrizePool/Base.lua Outdated
Comment thread lua/wikis/commons/PrizePool/Base.lua Outdated
Comment thread lua/wikis/commons/PrizePool/Base.lua Outdated
Comment thread lua/wikis/commons/PrizePool/Base.lua Outdated
@hjpalpha
Copy link
Copy Markdown
Collaborator

i think you also want to adjust TeamParticipant (to use the playershare there for calculation of the correct indiv prize money) for this to take the full effect you want

Comment thread lua/wikis/commons/PrizePool/Award/Placement.lua
Comment thread lua/wikis/commons/PrizePool/Placement.lua Outdated
Comment thread lua/test_assets/lpdb_placement.lua
@MischiefCS MischiefCS marked this pull request as ready for review March 23, 2026 09:23
@MischiefCS MischiefCS requested review from a team as code owners March 23, 2026 09:23
Copilot AI review requested due to automatic review settings March 23, 2026 09:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for handling prize pool “player share” vs “club share” splits so that LPDB and downstream earnings calculations can use the player-specific share where appropriate (while still keeping full prize money at event/team level).

Changes:

  • Store playershare from prize pool inputs into LPDB placement extradata.
  • Update team participant LPDB saving to compute individualprizemoney from extradata.playershare when present.
  • Add prize pool table columns for Player Share and computed Club Share, and extend prize pool specs for coverage.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
lua/wikis/commons/TeamParticipants/Repository.lua Uses extradata.playershare (when available) to compute per-player prize money for team participants.
lua/wikis/commons/PrizePool/Placement.lua Extracts PLAYER_SHARE1 reward and persists it to LPDB placement extradata.playershare.
lua/wikis/commons/PrizePool/Base.lua Introduces PLAYER_SHARE/CLUB_SHARE prize types, auto-adds club share, and computes club share for display.
lua/spec/prize_pool_spec.lua Extends specs to cover team prize pool parsing/display/LPDB storage with player share support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/wikis/commons/TeamParticipants/Repository.lua Outdated
Comment thread lua/wikis/commons/PrizePool/Base.lua
Comment thread lua/wikis/commons/PrizePool/Base.lua
Comment thread lua/wikis/commons/PrizePool/Base.lua Outdated
Comment thread lua/wikis/commons/PrizePool/Base.lua
Comment thread lua/wikis/commons/PrizePool/Base.lua
Comment thread lua/wikis/commons/PrizePool/Base.lua
Comment thread lua/wikis/commons/PrizePool/Base.lua Outdated
MischiefCS and others added 3 commits March 23, 2026 10:28
Co-authored-by: SyntacticSalt <mbergent@uni-bremen.de>
also ensure that when set it does not duplicate club share columns
Copy link
Copy Markdown
Collaborator

@ElectricalBoy ElectricalBoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am quite opposed to putting this in Commons at all, this looks very counterstrike-specific (maybe dota2 too, sure, but that's the end of the list anyway) and thus implies unnecessary runtime overhead on all other wikis

if this really should go to Commons, then imo it should be placed under /Valve variant or something (similar to how sc and sc2 share some custom modules)

@hjpalpha
Copy link
Copy Markdown
Collaborator

hjpalpha commented Mar 24, 2026

I am quite opposed to putting this in Commons at all, this looks very counterstrike-specific (maybe dota2 too, sure, but that's the end of the list anyway) and thus implies unnecessary runtime overhead on all other wikis

if this really should go to Commons, then imo it should be placed under /Valve variant or something (similar to how sc and sc2 share some custom modules)

as i understand it it is relevant for all team based wikis that are present at ewc

@MischiefCS
Copy link
Copy Markdown
Collaborator Author

I am quite opposed to putting this in Commons at all, this looks very counterstrike-specific (maybe dota2 too, sure, but that's the end of the list anyway) and thus implies unnecessary runtime overhead on all other wikis
if this really should go to Commons, then imo it should be placed under /Valve variant or something (similar to how sc and sc2 share some custom modules)

as i understand it it is relevant for all team based wikis that are present at ewc

tbf I was partially wrong here. club share exists at EWC, but it appears you already handle EWC at a esports wiki level (didnt know this existed)

It isnt Valve specific though as theoretically operators who use a club share system i.e BLAST, ESL etc could use it in their other titles. Just a majority of other titles are franchise systems where it wouldnt apply.

@mbergen
Copy link
Copy Markdown
Collaborator

mbergen commented Mar 24, 2026

Fwiw I doubt there is any drastic runtime overhead with this

@MischiefCS
Copy link
Copy Markdown
Collaborator Author

MischiefCS commented Mar 24, 2026

I am quite opposed to putting this in Commons at all, this looks very counterstrike-specific (maybe dota2 too, sure, but that's the end of the list anyway) and thus implies unnecessary runtime overhead on all other wikis
if this really should go to Commons, then imo it should be placed under /Valve variant or something (similar to how sc and sc2 share some custom modules)

as i understand it it is relevant for all team based wikis that are present at ewc

tbf I was partially wrong here. club share exists at EWC, but it appears you already handle EWC at a esports wiki level (didnt know this existed)

It isnt Valve specific though as theoretically operators who use a club share system i.e BLAST, ESL etc could use it in their other titles. Just a majority of other titles are franchise systems where it wouldnt apply.

Also would this not apply to F1? Its obviously different terminology but the same principle no?

Edit: I guess not actually

@mbergen
Copy link
Copy Markdown
Collaborator

mbergen commented Mar 27, 2026

@Rathoz if you have a bit of spare time, your opinion on this would be appreciated

hjpalpha added 4 commits May 4, 2026 07:56
* try to resolve comment

* nil catch

* chore: update visual snapshots

* lets try this

* chore: update visual snapshots

* extension ate a char again ...
@hjpalpha hjpalpha requested review from ElectricalBoy and mbergen May 7, 2026 17:29
Copy link
Copy Markdown
Collaborator

@hjpalpha hjpalpha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Copy Markdown
Collaborator

@ElectricalBoy ElectricalBoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still not a fan of this PR, but whatever

Comment thread lua/wikis/commons/PrizePool/Base.lua Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants